package moonstruckdrops.datastore.provider;

import java.io.Serializable;
import java.util.Iterator;
import java.util.List;

import moonstruckdrops.dao.ComentDao;
import moonstruckdrops.dto.ComentDto;

import org.apache.wicket.markup.repeater.data.IDataProvider;
import org.apache.wicket.model.IModel;

public class BlogComentProvider implements IDataProvider<ComentDto>,Serializable{

	private static final long serialVersionUID = 1L;

	transient ComentDao dao;
	
	public Iterator<? extends ComentDto> iterator(int first, int count) {
		return null;
	}
	
	public void saveComent(ComentDto NewComent){
		resolveDao();
		dao.NewComentSave(NewComent);
	}
	
	public List<ComentDto> getComent(Long ID){
		resolveDao();
		return dao.getComent(ID);
	}
	
	public int size() {
		return 0;
	}

	void resolveDao() {
		if(dao == null) {
			dao = new ComentDao();
		}
	}
	
	public IModel<ComentDto> model(ComentDto object) {
		return null;
	}
	
	public void detach() {
	}
}
